package com.wing.sell.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.wing.purchase.model.entity.PurBarterGoodsRecords;
import com.wing.purchase.model.response.PurBarterGoodRecordsSearchVo;
import com.wing.sell.model.entity.SelBarterGoodsRecords;
import com.wing.sell.model.response.SelBarterGoodRecordsSearchVo;
import com.wing.sell.model.response.SelBarterGoodsRecordDetailVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

/**
 * 采购换货表-Dao
 *
 * @author
 */
@Mapper
public interface SelBarterGoodsRecordsDao extends BaseMapper<SelBarterGoodsRecords> {
    /**
     * 查询退货记录
     * @param pg
     * @param params
     * @return
     */
    List<SelBarterGoodRecordsSearchVo> list4app(@Param("page") Page<SelBarterGoodRecordsSearchVo> pg, @Param("params") Map<String, Object> params);

    /**
     * 查询详情信息
     * @param recordId
     * @return
     */
    SelBarterGoodsRecordDetailVo getByDetailinfoBy(@Param("recordId") String recordId);

    /**
     * 查询已发货数量
     * @param id
     * @param code
     * @return
     */
    BigDecimal getGetQuantityForLogistics(@Param("id") Long id,@Param("code") String code);
}
